# Maintainer: Felix Yan <felixonmars@gmail.com>
# Contributor: ponsfoot <cabezon dot hashimoto at gmail dot com>

pkgname=otf-ipafont
pkgver=003.03
_pkgver=${pkgver/./}
pkgrel=8
pkgdesc="Japanese outline fonts by Information-technology Promotion Agency, Japan (IPA)"
arch=('any')
url="https://ipafont.ipa.go.jp/"
license=('custom')
groups=('ipa-fonts')
source=(https://ipafont.ipa.go.jp/IPAfont/IPAfont${_pkgver}.zip)
sha512sums=('d3e4a1f189356b7a8b0cba9c706987413c8107f9e43ab2ccf52be6d0483efad8c97b68e075a35c5d04603c460dac7f282c4645ddc8318e993368ec47407f894e')

package() {
  cd IPAfont$_pkgver

  install -d "$pkgdir"/usr/share/fonts/OTF
  install -m644 *.ttf "$pkgdir"/usr/share/fonts/OTF/

  install -d "$pkgdir"/usr/share/licenses/$pkgname
  install -m644 IPA_Font_License_Agreement_v1.0.txt \
                Readme_IPAfont$_pkgver.txt \
    "$pkgdir"/usr/share/licenses/$pkgname/
}
